<html>
<!--
  vim: sts=4 sw=4 et
  -->
<head>
    <title>Leaflet</title>
	<link rel="stylesheet" href="../../css/leaflet.css" />
    <link rel="stylesheet" href="../css/distance.css" />
    <link rel="stylesheet" href="../../css/leaflet.draw.css" />
	<script src="../../leaflet.js"></script>
    <script src="../../leaflet.draw.js"></script>
    <script src="../layer/vector/GPX.js"></script>
    <script src="../control/Scale.js"></script>
    <script src="../control/Permalink.js"></script>
    <script src="../control/Permalink.Line.js"></script>
    <script src="../control/Distance.js"></script>
</head>
<body>
	<!-- define a DIV into which the map will appear. Make it take up the whole window -->
	<div style="width:100%; height:100%" id="map"></div>
    <script type='text/javascript'>
    </script>
    <script type="text/javascript">

var map = new L.Map('map', {center: new L.LatLng(58.4, 43.0), zoom: 11});
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');

map.addLayer(osm);
var d = new L.Control.Distance(); map.addControl(d);
map.addControl(new L.Control.Scale());
map.addControl(new L.Control.Permalink({line: d.getLine(), useLocation: true}));

</script>
</body>
</html>
